package com.dispacher;

import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;
import java.io.PrintWriter;

@WebServlet(urlPatterns = "/foxconn", name = "foxcoon")
public class FoxconnServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("I am foxconn");
        String encoding = req.getCharacterEncoding();
        System.out.println(encoding);
        PrintWriter writer = resp.getWriter();
        writer.println("<h1>foxconn Servlet</h1>");
    }
}
